

Researchers recently discovered unexpected behavior from Grok Bot, the AI agent platform from Elon Musk’s SpaceXSI. Over five days, Grok bots installed on two separate employee laptops made 31 requests to access data stored in employee calendar, email, Slack, and GitHub accounts. The bots performed the actions even though the employees had never ordered them and continued doing them even after employees instructed them to stop. The bots also denied having taken the actions at all.
The behavior was reported Tuesday by NewCore, the maker of a managed gateway product that acts as an intermediary between AI agents and the tools and accounts they are assigned to work with. In some cases, the unapproved access attempts occurred while the laptop with Grok Bot installed had its lid shut, or late at night while the employee was sleeping. None of the unprompted actions were recorded in Grok logs. Without the gateway logs, the employees would have had no idea they occurred. And of course, without the gateway, the unapproved accesses would have succeeded—again without the end user's knowledge.
Once the employees learned that Grok Bot had tried to check in with accounts without prompting, one of them instructed the agent, four separate times, to stop taking any actions on its own. The agent's reply was: “I won’t set that up, and I’ll stop offering recurring check-ins.” Despite acknowledging the explicit instructions, the Grok Bot made more unapproved access attempts. When one of the employees asked the bot if it made any accesses, it checked twice and then outputted: “Overnight into Friday morning I was idle.”
The NewCore employees sent the gateway logs to Grok Bot support personnel and asked what was causing the bots to access accounts without prompting or approval. The support team’s reply indicated the behavior was by design and intended to allow the bots to proactively take actions on behalf of users. In other words, the unrequested and unlogged access attempts were a feature designed to make Grok Bot more useful by periodically checking in and finding tasks to perform before a user even asks. The proactive check-in is a feature of Cursor, the AI coding service SpaceXSI recently acquired.
“There is no bug to patch, which is exactly why this is worse than a bug,” Ido Hoorvitch, a NewCore security researcher, wrote in an email. “A vulnerability gets fixed. This is the product working as designed: an agent that holds your credentials, acts under your identity while you sleep, ignores the one refusal you can give it, and then tells you it did nothing.”
Hoorvitch said that Grok Bot provides minimal notification of the automatic “turns,” or the cycles that occur when an agent receives instructions or context, decides what to do, and calls whatever tools it chooses. The notice comes during onboarding when the bot says it keeps working while the user is away from the computer and connects to apps and uses them the way the user does.
“It reads like a welcome message and scrolls off the screen in under a minute,” Hoorvitch said. “Nobody is asked to consent to it. Nothing says the platform will start turns with no message from you, or that those turns will use your connectors.”
The researcher said that Grok Bot documentation notes that a primary bot checks in on its own, and a changelog mentions brief background wakes, but there is no mention that the check-ins “reach into your connected apps.” Further, once a check-in runs, there is no mention of it in the chat interface or in the chat history, and as already noted, prompts to stop check-ins don’t work. Hoorvitch said the bot “always asks before making changes,” but that applies only to events in which data or changes are written to an app.
NewCore contacted Grok Bot support on November 4. At the time, users had no way to turn off the automatic check-ins. Then, eight days later, Hoorvitch said, the Cursor dashboard, the administrative console behind Grok Bot, received an update. Under bot capabilities, a new toggle called proactive messages appeared. By default, it’s set to on. When a team admin sets it to off, bots no longer run check-ins on their own.
SpaceXSI representatives didn’t answer questions sent by email.
Suppose you have two programs, one a GUI program and another a program that runs in the background. The GUI program asks the background program to do some work, and then the background program realizes that it needs to display a dialog box. How do you get that dialog box to appear as if it were shown by the GUI program?
If you have the background program simply try to show a dialog box with no owner, then that dialog box has no relationship to the GUI program’s main window, which means that there is no requirement that the dialog box appear in front of the GUI program’s main window. If the GUI program didn’t disable its main window, then you have the situation where both windows (the GUI program main window and the dialog box) can be clicked on and interacted with. But if the GUI program did disable its main window, the fact that the main window can end up in front of the dialog box from the background program means that the user can’t see the dialog box that is preventing them from making progress.
The GUI program should include its window handle as part of the call into the background program, so that the background program can use that window handle as the owner for the dialog box. If the dialog box is modal, this also disables the GUI program’s window, and if the user tries to click on the GUI program’s window, the window manager will instead put focus on the dialog box (and blink its title bar).
Note that a cross-thread owner/owned relationship implicitly attaches the two threads’ input queues, which means that both threads need to to remain responsive to window messages in order for things to work properly until the attachment is implicitly broken when the dialog box is destroyed.
That’s the ideal situation, but maybe you aren’t in the ideal situation.
For example, maybe the GUI program is written in a framework that doesn’t give you access to the window handle.
You could have the GUI program call AllowSetForegroundWindow() with the process ID of the background program, so that the background program can call SetForegroundWindow() on its dialog box and try to bring it to foreground.
Now, if the GUI program didn’t have foreground, then it can’t give away a permission that it doesn’t itself possess, and the call to SetForegroundWindow will fail.
There’s not much more you can do at this point. The system doesn’t want to let random programs steal focus, and since there was no coordination with the window that has focus, you look like a random program as far as the system is concerned.
But really, the solution is to fix the design.
You’ve already separated the problem into a GUI process and a background process, so honor that separation: Don’t make the background process try to do UI. UI is the job of the GUI process.
If the background process wants to display UI, it can ask the GUI process to do it, and then the GUI process can send back the dialog box result. One way to do this would be to have the background process return an error code like “UI required” and information about what UI it needs. The GUI process can then display the UI, gather the answer, and then call the background process again. Another way to do it is to have the background process call back into the GUI process when it needs UI, and the GUI process displays the UI, gathers the answer, and returns it to the background process. There are pros and cons to both of these designs, so you can choose the one that works best for you.
The post How can I ask a second program to show a dialog box as if it were shown by my first program? appeared first on The Old New Thing.
Read more of this story at Slashdot.
Read more of this story at Slashdot.
Read more of this story at Slashdot.